package com.sky.controller.admin;

import com.sky.dto.shopping.ShoppingCartDTO;
import com.sky.entity.ShoppingCart;
import com.sky.result.Result;
import com.sky.service.User.ShoppingCart.ShoppingCartService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author 褚金龙
 * @Date 2024/9/24 15:30
 */
@CrossOrigin("*")
@RestController("AdminShoppingCartController")
@RequestMapping("/admin")
@Api(tags = "管理端购物车相关接口")
@Slf4j
public class ShoppingCartController {
      @Autowired
      private ShoppingCartService shoppingCartService;



    @GetMapping("/shoppingCart/list")
    @ApiOperation("查看购物车")
    public Result<List<ShoppingCart>> list(){

       List<ShoppingCart> list= shoppingCartService.queryShoppingCart();
        return Result.success(list);
    }






}
